package edu.stanford.prpl.common;

public class Pair<N, V> {
	public N first;
	public V second;

	public Pair(N name, V value) {
		this.first = name;
		this.second = value;
	}

	public void setFirst(N first) {
		this.first = first;
	}

	public N getFirst() {
		return first;
	}

	public void setSecond(V second) {
		this.second = second;
	}

	public V getSecond() {
		return second;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Pair) {
			Pair pair = (Pair) obj;
			return (this.getFirst().equals(pair.getFirst()) && this.getSecond().equals(pair.getSecond()));
		}
		return false;
	}

}
